package com.java.oop;

/**
 * 人类
 */
public class Person {

    private String name;
    private int age;
    private String gender;
    private String address;

    public Person(){
        System.out.println("Person无参构造方法");
    }

    public Person(String name, int age, String gender, String address) {
        System.out.println("Person有参的构造方法");
        this.name = name;
        this.age = age;
        this.gender = gender;
        this.address = address;
    }

    /**
     * 说话
     */
    public void speak(){
        System.out.println("你好！我叫" + name);
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public String getGender() {
        return gender;
    }

    public void setGender(String gender) {
        this.gender = gender;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }


}
